package com.example.group.network.express_plus_app.viewmodel.bean;

import androidx.annotation.Nullable;

/**
 * @author 夏宁
 * @email 1941512303@qq.com
 * @date 2021/3/27 14:50
 */
public class RegisterFormState {
    @Nullable
    private Integer phoneError;
    @Nullable
    private Integer passwordError;
    @Nullable
    private Integer rePasswordError;
    private boolean isDataValid;

    public RegisterFormState(@Nullable Integer phoneError, @Nullable Integer passwordError, @Nullable Integer rePasswordError) {
        this.phoneError = phoneError;
        this.passwordError = passwordError;
        this.rePasswordError = rePasswordError;
        this.isDataValid=false;
    }

    public RegisterFormState(boolean isDataValid) {
        this.phoneError = null;
        this.passwordError = null;
        this.rePasswordError = null;
        this.isDataValid = isDataValid;
    }

    @Nullable
    public Integer getPhoneError() {
        return phoneError;
    }

    @Nullable
    public Integer getPasswordError() {
        return passwordError;
    }

    @Nullable
    public Integer getRePasswordError() {
        return rePasswordError;
    }

    public boolean isDataValid() {
        return isDataValid;
    }
}
